package com.xxl.job.executor.persistence.beans;


import com.google.gson.annotations.SerializedName;

import java.math.BigDecimal;

/**
 * Created by yzm on 2019/06/14.
 */
public class VehicleSignPic implements BaseData {

    @SerializedName(value = "ID", alternate = {"id", "Id"})
    private String id;
    @SerializedName(value = "POINTTYPE", alternate = {"pointType"})
    private Integer pointType;
//    private String imageURL;
//    private String tailImageURL;
    @SerializedName(value = "IMAGE", alternate = {"image"})
    private String image;
    @SerializedName(value = "TAILIMAGE", alternate = {"tailImage"})
    private String tailImage;
    private String listNo;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public Integer getPointType() {
        return pointType;
    }

    public void setPointType(Integer pointType) {
        this.pointType = pointType;
    }

    public String getImage() {
        return image;
    }

    public void setImage(String image) {
        this.image = image;
    }

    public String getTailImage() {
        return tailImage;
    }

    public void setTailImage(String tailImage) {
        this.tailImage = tailImage;
    }

    public String getListNo() {
        return listNo;
    }

    public void setListNo(String listNo) {
        this.listNo = listNo;
    }

    @Override
    public String findStringByKey(String key) throws Exception {
        String ret = "#{$NOT_FOUND$}#";
        switch (key) {
            case "ID": ret = getId();break;
            case "IMAGE": ret = getImage();break;
            case "TAILIMAGE": ret = getTailImage();break;
            case "LISTNO": ret = getListNo();break;
            default:break;
        }
        if (ret != null && ret.equals("#{$NOT_FOUND$}#")) {
            throw new Exception("VehicleSignPic未匹配到数据:"+key);
        }
        return ret;
    }

    @Override
    public BigDecimal findNumberByKey(String key) throws Exception {
        BigDecimal ret = null;
        switch (key) {
            case "POINTTYPE": ret = new BigDecimal(getPointType());break;
            default:break;
        }
        if (ret == null) {
            throw new Exception("VehicleSignPic未匹配到数据:"+key);
        }
        return ret;
    }
}
